package com.ecube.protocol;

import com.ecube.protocol.common.DataReportHead;
import com.ecube.utils.DateUtils;

/**
 * 辅助类
 *
 * @author zhuweijun
 * @version 1.0.0
 * @since 2025/7/29 11:33
 */
public class ProtocolHelper {

    /**
     * 创建所以头
     *
     * @param productCode productCode
     * @param deviceCode deviceCode
     * @param function function
     * @return {@link DataReportHead}
     */
    public static DataReportHead getReportHand(String productCode, String deviceCode, String function) {
        return DataReportHead.builder()
                .productKey(productCode)
                .deviceCode(deviceCode)
                .function(function)
                .index(1)
                .reason(1)
                .timeStamp(DateUtils.getNowDate())
                .version("V1.0.1")
                .build();
    }
}
